<?php

require_once ('BaseAjaxModule.php');

class ProductModule extends BaseAjaxModule {
	
	public function loadFeaturedProductsTask()	{
		$pro = new Model_Product();
		$this->view->result = $pro->getFeaturedProduct();
	}
	
	public function loadProductDetailTask()	{
		$pro = new Model_Product();
		$pro->id = $this->getParam('id');
		$pro->connect();
		$this->view->result = $pro->getInfo();
	}
	
	public function browseProductsTask()	{
		$this->view->result = Model_Product::browse();
	}
	public function searchProductsTask()	{
		$key = $this->getParam('key');
		$this->view->result = Model_Product::searchProducts($key);
	}
}

?>